import os
from django.conf import settings
from django.conf.urls.defaults import *
from coatl.bookmarks.feeds import BookmarkFeed
#from coatl.news.feeds import NewsFeed

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

feeds = {
#'news': NewsFeed,
#'blog': BlogFeed,
#'podcasts': PodcastFeed,
'bookmarks': BookmarkFeed
}

urlpatterns = patterns('',
    # Uncomment the next line to enable admin documentation:
    # (r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line for to enable the admin:
    (r'^admin/(.*)', admin.site.root),
    (r'^media/(.*)$', 'django.views.static.serve', {'document_root': os.path.join(settings.PROJECT_PATH, '.', 'media')}),
    (r'^blog/', include('coatl.blog.urls')),
    (r'^news/', include('coatl.news.urls')),
    (r'^polls/', include('coatl.polls.urls')),
    url(r'^$', 'coatl.news.views.display'),   # HomePage
    (r'^feeds/(?P<url>.*)/$', 'django.contrib.syndication.views.feed', 
        {'feed_dict': feeds}
    )
)
